package main

import (
	"fmt"
)

type Cat struct {
	Name  string
	Age   int
	Color string
}

type Animal struct {
	Name  string
	Age   int
	Color string
}

func (cat *Cat) Eat() {
	fmt.Print("猫", cat.Name, "吃猫粮")
}

func main() {
	var cat Cat
	var ptr *Cat = &cat
	fmt.Printf("%v\n", cat)
	fmt.Printf("%p\n", &cat)
	fmt.Printf("%p\n", ptr)
	fmt.Printf("%p\n", &ptr)

	var ani Animal
	ani = Animal(cat)
	fmt.Print(ani)
}
